using System;
using System.Collections.Generic;
using System.Text;
using Preparation;

namespace Tester.GuiActions.Actions.Impl
{
    public class ExitAction :BaseAction
    {
        public override bool Visible
        {
            get
            {
                return TesterMultyDocument.Instance == null || 
                      TesterMultyDocument.Instance.Suspended == TesterMultyDocument.SuspendStates.Stopped;
            }
        }

        public override void MainAction(object sender, EventArgs e)
        {
            if (Visible)
            {
                TesterMainForm.Instance.Close(); 
            }
        }
    }
}
